import Vue from 'vue';
import Router from 'vue-router';

Vue.use(Router);
export default new Router({
    routes: [{
            path: '/',
            redirect: '/dashboard'
        },
        {
            path: '/',
            component: () =>
                import ( /* webpackChunkName: "home" */ '../components/common/Home.vue'),
            meta: {
                title: '自述文件'
            },
            children: [{
                    path: '/dashboard',
                    component: () =>
                        import ( /* webpackChunkName: "dashboard" */ '../components/page/Dashboard.vue'),
                    meta: {
                        title: '系统首页'
                    }
                },
                {
                    path: '/UserManage',
                    component: () =>
                        import ('../components/page/UserManage'),
                    meta: {
                        title: '用户管理'
                    }
                },
                {
                    path: '/DataMain',
                    component: () =>
                        import ('../components/page/DataMain'),
                    meta: {
                        title: '字典管理'
                    }
                },



                
                {
                    path: '/Dept',
                    component: () =>
                        import ('../components/page/Dept'),
                    meta: {
                        title: '部门管理'
                    }
                },
                {
                    path: '/promotionsManage',
                    component: () =>
                        import ('../components/page/promotionsManage'),
                    meta: {
                        title: '推广商户管理'
                    }
                },
                {
                    path: '/BannerManage',
                    component: () =>
                        import ('../components/page/BannerManage'),
                    meta: {
                        title: '推广轮播图管理'
                    }
                },
                {
                    path: '/PromotionsUserType',
                    component: () =>
                        import ('../components/page/PromotionsUserType'),
                    meta: {
                        title: '商户类型管理'
                    }
                },
                {
                    path: '/promotionsquestion',
                    component: () =>
                        import ('../components/page/promotionsquestion'),
                    meta: {
                        title: '问题列表'
                    }
                },
                {
                    path: '/RecordSearch',
                    component: () =>
                        import ('../components/page/RecordSearch'),
                    meta: {
                        title: '日志记录'
                    }
                },
                {
                    path: '/404',
                    component: () =>
                        import ( /* webpackChunkName: "404" */ '../components/page/404.vue'),
                    meta: {
                        title: '404'
                    }
                }
            ]
        },
        {
            path: '/login',
            component: () =>
                import ( /* webpackChunkName: "login" */ '../components/page/Login.vue')
        },
        {
            path: '/searchScale',
            component: () =>
                import ('../components/page/searchScale.vue')
        },
        {
            path: '*',
            redirect: '/404'
        }
    ]
});